﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPFLOBMVVM.Model
{
    public class BlogPost : IComparable<BlogPost>
    {

        #region " Declarations "

        private DateTime _datDatePublished;
        private string _strAuthor = string.Empty;
        private string _strCategory = string.Empty;
        private string _strTitle = string.Empty;
        private string _strURL = string.Empty;

        #endregion

        #region " Properties "

        public string Author
        {
            get { return _strAuthor; }
            set { _strAuthor = value; }
        }

        public string Category
        {
            get { return _strCategory; }
            set { _strCategory = value; }
        }

        public DateTime DatePublished
        {
            get { return _datDatePublished; }
            set { _datDatePublished = value; }
        }

        public string Title
        {
            get { return _strTitle; }
            set { _strTitle = value; }
        }

        public string URL
        {
            get { return _strURL; }
            set { _strURL = value; }
        }

        #endregion

        #region " Constructor "

        public BlogPost()
        {
        }

        #endregion

        #region " Methods "

        public int CompareTo(BlogPost other)
        {
            return other.DatePublished.CompareTo(this.DatePublished);
        }
    }

        #endregion 
}
